<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	    <link rel="stylesheet" type="text/css" href="../../../css/app.css">
	    <link rel="stylesheet" type="text/css" href="../../../css/tabBar.css">
	    <link rel="stylesheet" type="text/css" href="./city_select.css"/>
	    <title>城市选择</title>
	</head>
	<body>
		<!--
			//--打开城市选择器
          	api.openFrame({
              	name: 'goShopPerson',
              	url: 'widget://src/Shop/city_select/city_select.html',
              	reload: true,
              	animation: {
              		type:"movein",
              	 	subType:"from_bottom",
              	 	duration:200
              	},
              	bgColor: 'rgba(0,0,0,.5)'
           	});

        	//--选择完城市后返回数据
        	//--数据格式{code: 0,data: '',msg: ''}，code(0-成功，1-取消选择)
        	//--示例，成功{"code":0,"data":{"province_id":243,"city_id":276,"district_id":280,"province_name":"山西省","city_name":"长治市","district_name":"襄垣县","full_name":"山西省 长治市 襄垣县","full_id":"243,276,280"},"msg":"已选择地址"}
            //--示例，取消选择{"code":1,"msg":"已取消选择","data":""}
            //--打开城市选择页面，监听的事件
	        api.addEventListener({
	            name: 'citySelect_'
	        }, function(ret, err) {
	            console.log(JSON.stringify(ret.value));
	        });

		-->
		<div class="city-select-wrap">
			<div class="city-select-bg" @click="addressAddCitySelectClose"></div>
			<div class="city-select-box">
				<h2 class="city-select-title">请选择城市 <span @click="addressAddCitySelectClose">×</span></h2>
				<div class="city-select-show">
					<span :class="activeIndex == 0 ? 'active': ''" data-index="0" v-show="0 <= activeIndex" @click="cityName_p" v-html="name_p"></span>
					<span :class="activeIndex == 1 ? 'active': ''" data-index="1" v-show="1 <= activeIndex" @click="cityName_c" v-html="name_c"></span>
					<span :class="activeIndex == 2 ? 'active': ''" data-index="2" v-show="2 <= activeIndex" @click="cityName_d" v-html="name_d"></span>
				</div>
				<ul class="city-select-list">
					<li v-for="item in city" :data-id="item.zone_id" :data-index="activeIndex" :data-name="item.name" v-html="item.name" @click="getCityId"></li>
				</ul>
			</div>
		</div>
	</body>
	<script src="../../sea.js" data-main="../../main"></script>
	<script type="text/javascript" src="../../vue.js"></script>
	<script type="text/javascript" src="./citySelect.js"></script>
</html>
